/*
//删点成林
class Solution {
    Set<Integer> set;
    List<TreeNode> list;

    public List<TreeNode> delNodes(TreeNode root, int[] to_delete) {
        set = new HashSet();
        list = new ArrayList<>();
        for (int x : to_delete) {
            set.add(x);
        }
        if (dfs(root) != null)
            list.add(root);
        return list;
    }

    private TreeNode dfs(TreeNode node) {
        if (node == null)
            return null;
        node.left = dfs(node.left);
        node.right = dfs(node.right);
        if (set.contains(node.val)) {
            if (node.left != null)
                list.add(node.left);
            if (node.right != null)
                list.add(node.right);
            return null;
        }
        return node;
    }
}
*/
